package com.xx.constant;

import java.util.HashMap;
import java.util.Map;

public class DBType {
    private static Map<String, String> dbs = new HashMap<String, String>() {{
        dbs.put("mysql", "com.mysql.jdbc.Driver");
        dbs.put("postgresql", "org.postgresql.Driver");
        dbs.put("oracle", "oracle.jdbc.driver.OracleDriver");
    }};

    /**
     * 获得driver
     *
     * @param type type
     * @return String
     */
    public static String getDriverStr(String type) {
        return dbs.get(type);
    }
}
